package shiYansi;

import java.util.ArrayList;
import java.util.Scanner;

class LabInfo extends Student{
	int incom;
	String a;
	static double tax1 = 0,tax2 = 0.03,tax3 = 0.1;
	ArrayList alist1 = new ArrayList();
	public void ClearRating(String rating) {		
		alist1.add(rating);
	}
	public void Shuqian() {
		for(int i=0;i<alist1.size();i++) {

			if(alist1.get(i).equals("优")==true) {
				incom = this.incom + 200;
			}
			if(alist1.get(i).equals("良好")==true) {
				incom = this.incom + 150;
			}
			if(alist1.get(i).equals("及格")==true) {
				incom = this.incom + 100;
			}
			if(alist1.get(i).equals("差")==true) {
				incom = this.incom + 50;
			}
			if(alist1.get(i).equals("极差")==true) {
				incom = this.incom + 0;
			}
		}
		System.out.println("税前收入：" + incom);
	}
	public void shhouInc() {
		double shhouIncom = 0.0;
		if(incom <= 5000) {
			shhouIncom = incom - incom*tax1;
		}
		if(incom > 5000 && incom <= 8000) {
			shhouIncom = incom - incom*tax2;
		}
		if(incom > 8000 && incom <= 17000) {
			shhouIncom = incom - incom*tax3;
           
		}

		System.out.println("税后收入：" + shhouIncom);
	}
	
}
